package com.fanbai.score.staff.fragemnt;

/**
 * Created by acer on 2017/5/6.
 */

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.fanbai.score.R;
import com.fanbai.score.common.activity.LoginActivity;
import com.fanbai.score.common.base.BaseFragment;
import com.fanbai.score.common.view.NoScrollListView;
import com.fanbai.score.common.zxing.activity.CaptureActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * A placeholder fragment containing a simple view.
 */
public class Home_Fragment extends BaseFragment {


    /**
     * The fragment argument representing the section number for this
     * fragment.
     */
    private static final String ARG_SECTION_NUMBER = "section_number";

    /**
     * Returns a new instance of this fragment for the given section
     * number.
     */
    public static Home_Fragment newInstance(int sectionNumber) {
        Home_Fragment fragment = new Home_Fragment();
        Bundle args = new Bundle();
        args.putInt(ARG_SECTION_NUMBER, sectionNumber);
        fragment.setArguments(args);
        return fragment;
    }

    public Home_Fragment() {
    }


    @Override
    protected int getLayoutID() {
        return R.layout.staff_fragment_home;
    }

    @Override
    public String getTitleName() {
        return "店员";
    }

    @Override
    public void iniTitleLeft(ImageView imageView) {
        imageView.setImageResource(R.mipmap.ic_launcher);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                getActivity().startActivityForResult(new Intent(ctx, CaptureActivity.class),0);
            }
        });
    }

    @Override
    public void iniTitleRight(TextView tv) {
        tv.setText("退出");
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ctx.jumpToActivity(LoginActivity.class);
            }
        });
    }

    @Override
    protected void initView(View view) {
    }

    @Override
    protected void initData() {
    }

    @Override
    protected void initListener() {

    }
}
